package com.imooc.service;

import com.imooc.domain.Girl;
import com.imooc.respository.GirlRespontery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Macoco on 2017-05-09.
 */
@Service
public class GirlService {

    @Autowired
    private GirlRespontery girlRespontery;

    @Transactional
    public void insertTwo(){
        Girl girlA = new Girl();
        girlA.setCupSize("bb");
        girlA.setAge(20);
        girlRespontery.save(girlA);

        Girl girlB = new Girl();
        girlB.setCupSize("CCCCccccc");
        girlB.setAge(30);
        girlRespontery.save(girlB);

    }
}
